import java.text.DecimalFormat;
import java.util.ArrayList;

/*
 * The ArrayList "set" represents a set of names, e.g. "{Mueller, Schulz, Gerken}"
 * which has the evidence value "value"
 */
public class Evidence {
	
	private ArrayList<String> set;
	private double value;
	
	public Evidence(){
		set = new ArrayList<String>();
		value = 0.0;
	}
	
	public Evidence(ArrayList<String> set, double value){
		this.set = set;
		this.value = value;
	}
	
	public Evidence(String someName, double value){
		set = new ArrayList<String>();
		set.add(someName);
		this.value = value;
	}

	public ArrayList<String> getSet() {
		return set;
	}

	public void setSet(ArrayList<String> set) {
		this.set = set;
	}
	
	public void addString(String a){
		this.set.add(a);
	}

	public double getValue() {
		return value;
	}

	public void setValue(double value) {
		this.value = value;
	}
	
	public String toString(){
		DecimalFormat df = new DecimalFormat("#.##");
		return set + " -> " + df.format(value);
	}
}
